<template>
  <div>
    <h1>评测报告</h1>
    <el-table
      :data="tableData"
      border
      style="width: 100%">
      <el-table-column
        prop="evaluatingId"
        label="评测id"
        width="180">
      </el-table-column>
      <el-table-column
        prop="userId"
        label="用户id"
        width="180">
      </el-table-column>
      <el-table-column
        prop="questionnaireId"
        label="评测id">
      </el-table-column>
      <el-table-column
        prop="evaluatingGrade"
        label="分数">
      </el-table-column>
      <el-table-column
        prop="evaluatingRemark"
        label="问卷的评分">
      </el-table-column>
      <el-table-column
        label="操作">
        <template slot-scope="scope">
          <el-button @click="UserEvaluatingDeleted(scope.row.evaluatingId)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

  <script>
    import { UserEvaluatingSelect,UserEvaluatingDeleted } from '@/api/evaluating'
  export default {
    data() {
      return {
        tableData: [],
        tbUserEvaluating:{
          userId:''
        }
      }
    },
    mounted(){
      this.UserEvaluatingSelect()
    },
    methods:{
      UserEvaluatingSelect(){
        UserEvaluatingSelect(this.tbUserEvaluating).then((res)=>{
          this.tableData=res.data
          console.log(res.data)
        })
      },
      UserEvaluatingDeleted(row){
        UserEvaluatingDeleted(row).then((res)=>{
          this.UserEvaluatingSelect()
        })
      }
    }
  }
</script>

<style scoped></style>
